<!DOCTYPE html PUBLIC 
    "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
<html 
	xmlns="http://www.w3.org/1999/xhtml" 
	xmlns:ui="http://java.sun.com/jsf/facelets" 
	xmlns:h="http://java.sun.com/jsf/html" 
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:t="http://myfaces.apache.org/tomahawk"> 


	<ui:composition template="t_loggedin.xhtml">


	<ui:define name="javascript">
		<script type="text/javascript">
		</script> 
	</ui:define>	


	<ui:define name="menu">
		<h:form>
			<table class="leftmenu">
				<tbody>
					<!-- Logo -->
					<tr class="leftmenuheader">
						<th colspan="2"></th>
					</tr>
					<tr class="leftmenu">
                        <td colspan="2" class="image">
							<h:graphicImage value="images/router-active.png" rendered="#{routerBean.started}"/>
							<h:graphicImage value="images/router-inactive.png" rendered="#{!routerBean.started}"/>
						</td>
					</tr>				
					
					<!-- Status overview -->					
					<tr class="leftmenuheader">
						<th colspan="2"><h:outputText value="#{msgs['menu.heading.status']}" /></th>
					</tr>
					<tr class="leftmenu">
						<th><h:outputText value="#{msgs['router.menu.status']}" /></th>
						<td><h:outputText value="#{routerBean.status}" /></td>
					</tr>
					

					<!-- Actions -->
					<tr class="leftmenuheader">
						<th colspan="2">
							<h:outputText value="#{msgs['menu.heading.actions']}" />
						</th>
					</tr>				
					<tr class="leftmenu">
						<th colspan="2"><h:outputText value="#{msgs['general.noactions']}"/></th>
					</tr>

					<!-- Control -->
					<tr class="leftmenuheader">
						<th colspan="2">
							<h:outputText value="#{msgs['menu.heading.control']}" />
						</th>
					</tr>
					<tr class="leftmenu">
						<td colspan="2" width="150px">
						<h:outputText value="#{msgs['esb.menu.action.info']}" />
						</td>
					</tr>
					<tr class="leftmenu">
						<td align="center">
							<h:commandButton 
									id="mrStartButton"
									disabled="#{routerBean.started}"
									action="#{routerBean.getStatus}" 
									actionListener="#{routerStopStartActionHandler.start}"
									value="#{msgs['router.menu.action.start']}">
							</h:commandButton>
						</td>
						<td align="center">
							<h:commandButton
							        id="mrStopButton"
							        disabled="#{!routerBean.started}" 
									action="#{routerBean.getStatus}" 
									actionListener="#{routerStopStartActionHandler.stop}"
									value="#{msgs['router.menu.action.stop']}">
							</h:commandButton>
						</td>
					</tr>					
				</tbody>
			</table>
		</h:form>
	</ui:define>

	<ui:define name="body">
		<ui:decorate template="faces/router_stats.xhtml" />
	</ui:define>

</ui:composition>

</html>